#include <Inventor/Qt/SoQt.h>
#define GLOBALS_HERE 
#include "scenegraph.hpp"
#include "mainwin.hpp"
#include "face_cutter_trace_dialog.hpp"
#include "simulationwin.hpp"

MainWindow::MainWindow(QWidget *parent):QMainWindow(parent)
{
  setupUi(this);
  SoQt::init(this);

  scenegraph::root=new SoSeparator;
  scenegraph::root->ref();

  scenegraph::viewer=new SoQtExaminerViewer(this->viewplace);
  scenegraph::viewer->setSceneGraph( scenegraph::root);
}

MainWindow::~MainWindow()
{
  delete scenegraph::viewer;
  scenegraph::root->unref();
}

void MainWindow::on_actionBuildFaceCutterTrace_activated(){

face_cutter_trace_dialog *win= new face_cutter_trace_dialog;

win->show();
	}

void MainWindow::on_actionSimulate_activated(){
	simulationwin *win= new simulationwin;
	win ->show();
	
}

